<template>
    <el-carousel indicator-position="outside" height="450px">
        <el-carousel-item v-for="item in images" :key="item">
            <img :src="item.url" :alt="item.name" class="img">
        </el-carousel-item>
    </el-carousel>
</template>
 
<script setup>
import { ref } from 'vue'

const images = ref([
    { url: new URL("@/assets/images/imageA.jpg", import.meta.url).href, name: "imageA" },
    { url: new URL("@/assets/images/imageB.png", import.meta.url).href, name: "imageB" },
    { url: new URL("@/assets/images/imageC.png", import.meta.url).href, name: "imageC" },
    { url: new URL("@/assets/images/linux.png", import.meta.url).href, name: "linux" },
    { url: new URL("@/assets/images/qd.png", import.meta.url).href, name: "qd" },
]);

</script>

<style lang="scss" scoped>
.el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
    background-color: #d3dce6;
}

.el-carousel__item {
    text-align: center;
}

.img {
    height: 100%;
    width: 100%;
}
</style>
  